package org.mparts.client.activity;

import org.mparts.client.ui.IMainView;

import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;

public class MainActivity extends AbstractMpartsActivity implements IMainView.IMainPresenter {

//    private ClientFactory clientFactory;
	private final EventBus eventBus;
	private final IMainView display;
	private final PlaceController placeController;

    @Inject
	public MainActivity(EventBus eventBus, IMainView display,
			PlaceController placeController
			) {
		this.eventBus = eventBus;
		this.display = display;
		this.placeController = placeController;
		
	}

	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus) {
//	   	 final IMainView view = clientFactory.getMainView();
//	   	 view.setPresenter(this);
		display.setPresenter(this);
	   	 panel.setWidget(display.asWidget());
	}

	@Override
	protected boolean isShowNews() {
		return true;
	}


}
